<?php
/**
 * 获取小工具的相关信息
 * 以json方式返回
 * solosky <solosky772@qq.com>
 */

include_once("common.php");

$names = explode("|",$_GET["names"]);
$infos = array();
foreach($names as $name){
	$jsonFile = $config["WIDGET_DIR"].$name."/json.php";
	if(!file_exists($jsonFile)){
		if(generateWidgetJson($name))
			$infos[$name] = json_decode(file_get_contents($jsonFile));
	}else
		$infos[$name] = json_decode(file_get_contents($jsonFile));
}
echo json_encode($infos);
exit(0);
?>